

<h1><?php echo lang('moderators'); ?></h1>

<div id="moderator_home" class="moderator_home">

    <fieldset class="ui-widget-content ui-corner-all left_col" style='width: 300px;' >
        <legend class="ui-widget-content ui-corner-all"><?= lang('conversations') ?></legend>
        <a href="javascript:refresh_conversations();" id="refresh_conversations" alt="<?= lang('refresh_users') ?>" ><img src="<?= base_url() ?>img/icons/Refresh.png" title="<?= lang('refresh_users') ?>" style="float: right;"/></a>
        <br/>
        <div id="conversation_list">
        <?php
        $this->load->view('home/conversation_list');
        ?>
        </div>
        <?php if( $this->session->userdata('user_group') == 4 ) { // SUPER MODERATOR ?>
        <input type="button" id="start_conversation_link" onclick="start_conversation();" value="<?= lang('start_conversation') ?>"/>
        <?php } ?>
    </fieldset>
    
    <fieldset class="ui-widget-content ui-corner-all conversation_tabs" style='width: 40%;'>
        <legend class="ui-widget-content ui-corner-all"><?= lang('messages') ?></legend>
        <div id='response'></div>
        <div id="tabs">
          <ul id="conversation_tab">
          </ul>
        </div>
      <div id="mod_message_div">
          <form id="form-mod-message" action="javascript:void(null)"  method="post">
            <label><?=lang('message')?>:</label>
            <textarea name="mod_message" id="mod_message" class="text txtarea ui-widget-content ui-corner-all" style="margin-top: 20px; width: 80%;"></textarea>     
            <br/>
            <div id="mod_response" ></div>
            <br/>
            <label> &nbsp; </label>
             <input type="button" name="send_mod_message" id="send_mod_message" value="<?=lang('term_send')?>" class='right ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all' />
            </form>
        </div>    
    </fieldset>
    <?php 
    $this->load->view('home/send_message');
    ?>

<br/>

 <script type="text/javascript">
        //update_conversation();
         // Stalno pozivanje f-je da updateuje konverzaciju
        setInterval(update_conversation, REFRESH_TIME); 
        setInterval(update_mod_activity, REFRESH_TIME); 
        update_mod_activity();
        
 </script>

<div id="dialog-start-conversation" class="hide" title="<?php echo lang('start_conversation'); ?>"></div>
<div id="dialog-user" class="hide" title="<?php echo lang('term_user'); ?>"></div>

